VERSION 5.00
Object = "{194DB270-5D32-4614-93B7-0568F1AC965A}#1.0#0"; "ComUnionComponent.tlb"
Begin VB.Form frmComUnionNavigator 
   BackColor       =   &H00F7D9C2&
   BorderStyle     =   0  'None
   Caption         =   "Navigation"
   ClientHeight    =   9870
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   4365
   BeginProperty Font 
      Name            =   "Tahoma"
      Size            =   8.25
      Charset         =   0
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   Icon            =   "frmComUnionNavigator.frx":0000
   LinkTopic       =   "Form2"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   9870
   ScaleWidth      =   4365
   ShowInTaskbar   =   0   'False
   Tag             =   "~"
   Begin ComUnionComponentCtl.MenuPanel mpNavigation 
      Height          =   9195
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   4035
      Object.Visible         =   "True"
      Enabled         =   "True"
      ForegroundColor =   "-2147483630"
      BackgroundColor =   "16243138"
      SelectedTabIndex=   "0"
      SelectedTabText =   "Operation"
      BackColor       =   "194, 217, 247"
      Font            =   "Tahoma, 8.25pt"
      ForeColor       =   "ControlText"
      Location        =   "0, 0"
      Name            =   "MenuPanel"
      Size            =   "269, 613"
      Object.TabIndex        =   "0"
   End
End
Attribute VB_Name = "frmComUnionNavigator"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit



Private Sub Form_Load()
    Top = 0
    Left = 0
    mpNavigation.LoadOperation
    Me.Height = Screen.Height - 2500
    mpNavigation.Height = Me.Height
    mpNavigation.TabItemVisible(1) = False
    mpNavigation.TabItemVisible(3) = False
End Sub

Private Sub mpNavigation_ElementClicked()
On Error Resume Next
Dim FrmObj As Form, TempObj As Form
Dim Accessible As Boolean

    Dim Find As Boolean
    
    Find = False
        
    If mpNavigation.SelectedTabIndex = 0 Then
        
        If mpNavigation.IsParent = False Then
            Accessible = IsModuleaccessible(mpNavigation.SelectedNodeCode)
            For Each TempObj In Forms
            
                If TempObj.Name = mpNavigation.SelectedNodeLink Then
                    TempObj.Show
                    Find = True
                Else
                    If TempObj.Tag <> "~" Then
                        If Accessible Then
                            TempObj.Hide
                        End If
                    End If
                End If
            Next
            
            If Find = False Then
                If Accessible Then
                    frmComUnionMenuTab.MenuTab1.AddTab mpNavigation.SelectedNodeIndex, mpNavigation.SelectedNodeText, mpNavigation.SelectedNodeImage, mpNavigation.SelectedNodeLink
                    Set FrmName = Forms.Add(mpNavigation.FormToOpen)
                    FrmName.Show
                End If
            End If
        End If
        
    ElseIf mpNavigation.SelectedTabIndex = 1 Then
        If mpNavigation.IsParent = False Then
        
            frmComUnionMenuTab.MenuTab1.AddTab "Report Viewer", "Report Viewer", mpNavigation.SelectedImage, "frmComUnionBusinessIntelligenceUser"
            For Each TempObj In Forms
            
                If TempObj.Name = "frmComUnionBusinessIntelligenceUser" Then
                    TempObj.Show
                    
                    TempObj.BIUser1.CreateTab mpNavigation.SelectedIndex, mpNavigation.SelectedText
                    Find = True
                Else
                    If TempObj.Tag <> "~" Then
                        TempObj.Hide
                    End If
                End If
            Next
            
            If Find = False Then
                mpNavigation.ReadNetworkMappingXML
                NM_LocalName = mpNavigation.LocalName
                NM_RemoteName = mpNavigation.RemoteName
                NM_UserName = mpNavigation.UserName
                NM_Password = mpNavigation.Password
                Set FrmName = Forms.Add("frmComUnionBusinessIntelligenceUser")
                FrmName.Show
                FrmName.BIUser1.CreateTab mpNavigation.SelectedIndex, mpNavigation.SelectedText
            End If
        End If
        
    ElseIf mpNavigation.SelectedTabIndex = 3 Then
        If mpNavigation.IsParent = False Then
        
            frmComUnionMenuTab.MenuTab1.AddTab "Report Setup", " Report Setup", mpNavigation.SelectedImage, "frmComUnionBusinessIntelligenceAdmin"
            For Each TempObj In Forms
            
                If TempObj.Name = "frmComUnionBusinessIntelligenceAdmin" Then
                    TempObj.Show
                    TempObj.BIAdmin1.CreateTab mpNavigation.SelectedIndex, mpNavigation.SelectedText
                    Find = True
                    
                    
                Else
                    If TempObj.Tag <> "~" Then
                        TempObj.Hide
                    End If
                End If
            Next
            
            If Find = False Then
                Set FrmName = Forms.Add("frmComUnionBusinessIntelligenceAdmin")
                FrmName.Show
                FrmName.BIAdmin1.CreateTab mpNavigation.SelectedIndex, mpNavigation.SelectedText
            End If
        End If
        
   
    Else
        
        If mpNavigation.IsParent = False Then
        
            frmComUnionMenuTab.MenuTab1.AddTab mpNavigation.SelectedIndex, mpNavigation.SelectedText, mpNavigation.SelectedImage, mpNavigation.SelectedLink
    
            For Each TempObj In Forms
            
                If TempObj.Name = mpNavigation.FormToOpen Then
                    TempObj.Show
                    Find = True
                Else
                    If TempObj.Tag <> "~" Then
                        TempObj.Hide
                    End If
                End If
            Next
            
            If Find = False Then
                Set FrmName = Forms.Add(mpNavigation.FormToOpen)
                FrmName.Show
            End If
        End If
    End If
End Sub


